The doClickControl event reports that the user has clicked in a custom control. This event must be handled entirely by your application, since only you know how your custom control should behave.
Programming Considerations
``````````````````````````
• This event will never occur when the watch cursor is displayed, since
Indicator that an event has been reported that can’t be processed by Tools Plus.
The doManualEvent event reports that some type of event has occurred which should be processed by your application. This includes seven (7) possible types of events as defined by the Toolbox Event Manager, which are listed below. If your application does not make use of any of these events, it can ignore the doManualEvent event code.
diskEvt The Standard File Package takes care of all disk-inserted
events, so applications using this package can ignore
diskEvt events. If your application is unusual and it
circumvents the Standard File package, your application
will have to handle disk-inserted events itself.
networkEvt Your application needs to respond to network events only
if it is going to be communicating with the AppleTalk
manager. If it is, you should read the appropriate
documentation in chapter 10 Vol. 2 of Inside Macintosh
regarding network
driverEvt If your application does not intend to work with device
drivers, it can ignore these events. Otherwise, you
should read the appropriate documentation in Inside
Macintosh regarding device drivers
app1Evt Application-defined events 1 through 4. These are events
app2Evt whose meaning is defined by your application. If your
app3Evt application does not define custom events, it can ignore
app4Evt these event codes. Note that app4Evt (or osEvt) will
osEvt only be reported if your application does not respond to
Suspend/Resume events. See the SIZE resource for
details. If your application does respond to Suspend/
Resume events, it will receive a doSuspend or doResume
Tools Plus event.
kHighLevel- Your application needs to respond to these events only if
Evt you have defined the SIZE resource to respond to high-
The doMoveWindow event reports that the user has repositioned a window by dragging it by its title bar. Most applications will choose to ignore this event.
Programming Considerations
``````````````````````````
• The dragged window might not be the active window. The user can drag
an inactive window by holding down the Command key before beginning
the drag.
• If part or all of a window is exposed by the drag and needs to be
refreshed, a subsequent call to PollSystem will report a doRefresh
event for this window.
• Your application may call WindowStatus to obtain the window’s new
location in the screen’s global co-ordinates.
• This event will never occur when the watch cursor is displayed, since
the title bar cannot be clicked.
• A doMoveWindow event is not generated when the user drags a desk
The doClickDesk event reports that the user has clicked in the desk top. Most applications will choose to ignore this event, however, it can be used to deselect objects on the active window.
Programming Considerations
``````````````````````````
• This event will never occur when a modal window is active, since
clicks cannot occur outside of the window.
• This event will never occur when the watch cursor is displayed, since
Indicator that user has changed a window’s size and/or location by zooming.
The doZoomWindow event reports that the user has changed a window’s size and/or position by clicking the “zoom box.” This will always occur on the active window. Applications will typically ignore this event, or treat it similarly to the doGrowWindow event.
Programming Considerations
``````````````````````````
• Your application can call the WindowStatus procedure to obtain the
window’s new width and height in pixels, as well as its new location
in the screen’s global co-ordinates.
• The window’s entire contents are erased during the zoom. A subsequent
call to PollSystem will report a doRefresh event for this window.
Responding to the doRefresh event will regenerate the window’s
contents.
• This event will never occur when the watch cursor is displayed, since
the zoom box cannot be clicked.
• A doZoomWindow event is not generated when the user click’s a desk
accessory’s zoom box. The process is handled automatically.
Indicator that your application is about to be suspended.
The doSuspend event reports that your application will be suspended (or become a “background” application) the next time you call PollSystem. This occurs under MultiFinder or System 7 (or later) when a desk accessory or other application is launched, or when an inactive window belonging to a desk accessory or another application is activated.
DoSuspend and doResume events are not normally generated. If your application requires these events, see the related documentation regarding the SIZE resource in the “Completing Your Application” chapter of this manual.
Programming Considerations
``````````````````````````
• If your application is cutting, copying or pasting specialized objects
(i.e. not text that is handled by editing fields), copy this material
The doResume event reports that your application has become the active application. This occurs under MultiFinder or System 7 (or later) after your application has become suspended (see the doSuspend event).
DoSuspend and doResume events are not normally generated. If your application requires these events, see the related documentation regarding the SIZE resource in the “Completing Your Application” chapter of this manual.
Programming Considerations
``````````````````````````
• If your application is cutting, copying or pasting specialized objects
(i.e. not text that is handled by text editing fields), you may want
to check the clipboard to see if it contains the specialized objects
that you can paste, then copy them to your local scrap.
Discontinue a mouse’s “drag” or multiple clicks in progress.
pascal void ResetMouseClicks(void);
procedure ResetMouseClicks;
The PollSystem function is used to detect single-clicks, double-clicks, and triple-clicks, as well as dragging which occurs between a mouse-down and mouse-up event. In some applications, it may suffice to know that the user pressed the mouse button with the cursor being within a specific region or cursor zone, without concern for the mouse button’s release. Or an application may allow a single-click only, thereby disallowing double or triple clicks.
In such cases, the ResetMouseClicks procedure can be used to tell Tools Plus that sufficient mouse information has been retrieved, and to reset the click and drag mechanism. This reset will clear the current click or drag from PollSystem’s event queue. The next time the mouse button in pressed down, it will be considered to be a first mouse-down of either a single-click, double-click, triple-click, or drag.
See PollSystem for details on how the system responds to mouse events.
Determine if your application has been suspended (i.e. not the active application).
pascal Boolean ApplicationSuspended(void);
function ApplicationSuspended: BOOLEAN;
This function returns a value of true if a desk accessory or another application is active under MultiFinder or System 7 (or later). A value of false will be returned if your application is active, even though your application may not have any windows open.
When running under MultiFinder or System 7 (or later), your application needs to have a SIZE resource with the “AcceptSuspendEvents” bit set to “1.” See the SIZE resource for details.